<?php

use Illuminate\Database\Seeder;
use App\Models\Goods;
class GoodsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // 生成数据集合
       factory(Goods::class)->times(50)->create()->each(function ($goods){
                $goods->goods_content()->save(factory(App\Models\GoodsContent::class)->make());
        });
    }
}
